﻿<select data-bind="options: Fields, optionsText: 'Name', value: Selected, optionsCaption:'Choose property'">
</select>
<div data-bind="if: !!Selected()">

    <select data-bind="options: FieldTypes, optionsText: 'Name', value: SelectedType">
    </select>

</div>

<div data-bind="if: !!SelectedType()">
    <label>Label</label>
    <input type="text" data-bind="value : Result.Label" />
    <label>Order</label>
    <input type="text" data-bind="value : Result.Order" />

    <!-- ko if: SelectedType().Value == 0 -->
    @*Textfield*@
            <label>Length</label>
    <input type="text" data-bind="value : Result.Length" />
    <label>Multiline</label>
    <input type="checkbox" data-bind="checked : Result.Multiline" />
    <!-- /ko -->

    <!-- ko if: SelectedType().Value == 3 -->
    @*Textfield*@
            <!-- /ko -->

    @*<span data-bind="text: Result.Property"></span>
    <span data-bind="text: Result.Label"></span>
    <span data-bind="text: Result.Type"></span>*@
</div>
